import json
import os

if __name__=='__main__':
    '''
    mysqldump -u username -h host -p dbname > backdb.sql
    mysql -u username -p [dbname] < backup.sql
    '''
    with open('./cfg.json', 'r') as fp:
        cfg = json.load(fp)
        username, password = cfg['db']['user'], cfg['db']['password']
        os.system(f'mysqldump -u {username} -p ')
